Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fallback to 'monospace' for code font-family #1674

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Conversation

cjbayliss
Copy link
Contributor

Some people like myself disable custom fonts on the web. The reasons are often related to accesibility. In my case it is dyslexia, but there are probably other vision related reasons too.

Some people like myself disable custom fonts on the web. The reasons
are often related to accesibility. In my case it is dyslexia, but
there are probably other vision related reasons too.

Signed-off-by: Christopher Bayliss <[email protected]>
@SethTisue
Copy link
Member

looks plausible, but I don't know CSS myself — were you able to test it?

@cjbayliss
Copy link
Contributor Author

I did test it, however there is no need to take my word for it. MDM has a very easy to follow document on font-family: https://developer.mozilla.org/en-US/docs/Web/CSS/font-family

Two relevant quotes:

"The font-family property specifies a list of fonts, from highest priority to lowest."

and:

"You should always include at least one generic family name in a font-family list, since there's no guarantee that any given font is available. This lets the browser select an acceptable fallback font when necessary."

I'm not a CSS person, I'm not even a front-end dev. I love Mozilla's MDM, and can highly recommend it whenever you need info on a CSS property or anything related to Javascript.

Another very useful resource if you need to check if a PR is safe to merge is caniuse.com: https://caniuse.com/mdn-css_properties_font-family

These two resources make it so that people like us who don't know CSS well can easily contribute and review CSS changes.

Sorry for the tangent. 😅 I hope it is helpful for future reference :)

@SethTisue SethTisue merged commit 8ea5690 into scala:main Aug 14, 2024
1 check passed
@SethTisue
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants